package com.superman.view;

import com.alibaba.fastjson.JSON;
import com.superman.entity.User;
import com.superman.socket.TCPClient;

import java.io.IOException;

public class Register {
    public int register(User user){
        int row = -1;
        try {
            row = Integer.valueOf(TCPClient.getResponse("register#" + JSON.toJSONString(user)));
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            return row;
        }
    }
}

